
<div class="main">
    <div class="info">

        {% if data.column_type=="categorical" or data.column_type=="float" or data.column_type=="numeric" or data.column_type=="date" or
        data.column_type=="bool" or data.column_type=="array" or data.column_type=="null" or data.column_type=="timestamp"%}

        <div class="panel_profiler">
            <div>
                <h2>{{data.name}}</h2>
                <span>{{data.column_type}}</span>
            </div>
            <table>
                <tbody>
                <tr>
                    <td>Unique</td>
                    <td> {{data.stats.count_uniques}}</td>
                </tr>
                <tr>
                    <td>Unique (%)</td>
                    <td> {{data.stats.p_count_uniques}}</td>
                </tr>
                <tr>
                    <td>Missing</td>
                    <td>{{data.stats.count_na}}</td>
                </tr>
                <tr>
                    <td>Missing (%)</td>
                    <td>{{data.stats.p_count_na}}</td>
                </tr>
                </tbody>
            </table>
            <div>
                <h3>
                    Datatypes
                </h3>
            </div>
            <table>
                <tbody>
                <tr>
                    <td>
                        String
                    </td>
                    <td>
                        {{data.data_types_stats.string}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Integer
                    </td>
                    <td>
                        {{data.data_types_stats.int}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Decimal
                    </td>
                    <td>
                        {{data.data_types_stats.decimal}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Bool
                    </td>
                    <td>
                        {{data.data_types_stats.boolean}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Date
                    </td>
                    <td>
                        {{data.data_types_stats.date}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Missing
                    </td>
                    <td>
                        {{data.data_types_stats.missing}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Null
                    </td>
                    <td>
                        {{data.data_types_stats.null}}
                    </td>

                </tr>
                </tbody>
            </table>
            {% if data.column_type=="numeric" %}
            <div>
                <h3>
                    Basic Stats
                </h3>

            </div>
            <table>
                <tbody>
                <tr>
                    <td>Mean</td>
                    <td>{{data.stats.mean}}</td>
                </tr>
                <tr>
                    <td>Minimum</td>
                    <td>{{data.stats.min}}</td>
                </tr>
                <tr>
                    <td>Maximum</td>
                    <td>{{data.stats.max}}</td>
                </tr>
                <tr>
                    <td>Zeros(%)</td>
                    <td>{{data.stats.zeros}}</td>
                </tr>

                </tbody>
            </table>
            {% endif %}

        </div>
        <div class="panel_profiler">
            {% if data.frequency is defined%}
            <h3>Frequency</h3>
            <table>

                <tr>
                    <th>Value</th>
                    <th>Count</th>
                    <th>Frequency (%)</th>
                </tr>

                {% for vi in data.frequency[:10] %}
                <tr>
                    <td>{{vi.value}}</td>
                    <td>{{vi.count}}</td>
                    <td>{{vi.percentage}}%</td>
                </tr>

                {% endfor %}
                <tr>
                    <td>"Missing"</td>
                    <td>{{data.stats.count_na}}</td>
                    <td>{{data.stats.p_count_na}}%</td>
                </tr>

            </table>
            {% endif %}
        </div>
        {% endif %}

        {% if data.column_type=="numeric" %}
        <div class="panel_profiler">

            <h3>Quantile statistics</h3>
            <table>
                <tbody>
                <tr>
                    <td>Minimum</td>
                    <td>{{data.stats.min}}</td>
                </tr>
                <tr>
                    <td>5-th percentile</td>
                    <td>{{data.stats.percentile["0.05"]}}</td>
                </tr>
                <tr>
                    <td>Q1</td>
                    <td>{{data.stats.percentile["0.25"]}}</td>
                </tr>
                <tr>
                    <td>Median</td>
                    <td>{{data.stats.percentile["0.5"]}}</td>
                </tr>
                <tr>
                    <td>Q3</td>
                    <td>{{data.stats.percentile["0.75"]}}</td>
                </tr>
                <tr>
                    <td>95-th percentile</td>
                    <td>{{data.stats.percentile["0.95"]}}</td>
                </tr>
                <tr>
                    <td>Maximum</td>
                    <td>{{data.stats.max}}</td>
                </tr>
                <tr>
                    <td>Range</td>
                    <td>{{data.stats.range}}</td>
                </tr>
                <tr>
                    <td>Interquartile range</td>
                    <td>{{data.stats.interquartile_range}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="panel_profiler">
            <h3>Descriptive statistics</h3>
            <table>
                <tbody>
                <tr>
                    <td>Standard deviation</td>
                    <td>{{data.stats.stddev}}</td>
                </tr>
                <tr>
                    <td>Coef of variation</td>
                    <td>{{data.stats.coef_variation}}</td>
                </tr>
                <tr>
                    <td>Kurtosis</td>
                    <td>{{data.stats.kurtosis}}</td>
                </tr>
                <tr>
                    <td>Mean</td>
                    <td>{{data.stats.mean}}</td>
                </tr>
                <tr>
                    <td>MAD</td>
                    <td>{{data.stats.mad}}</td>
                </tr>
                <tr>
                    <td>Skewness</td>
                    <td>{{data.stats.skewness}}</td>
                </tr>
                <tr>
                    <td>Sum</td>
                    <td>{{data.stats.sum}}</td>
                </tr>
                <tr>
                    <td>Variance</td>
                    <td>{{data.stats.variance}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        {% endif %}
    </div>
    <table>
        {% if freq_pic is not none %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ freq_pic | safe }}">
                </div>

            </td>

        </tr>
        {% endif %}
        {% if hist_pic.hist_numeric_string is defined%}
        <tr>
            <td style="padding: 0em;">
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_numeric_string | safe }}">
                </div>
            </td>
        </tr>
        {% endif %}
        {% if hist_pic.hist_years is defined %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_years | safe }}">
                </div>
            </td>
        </tr>
        {% endif %}
        {% if hist_pic.hist_months is defined %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_months | safe }}">
                </div>
            </td>
        </tr>
        {% endif %}
        {% if hist_pic.hist_weekdays is defined %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_weekdays | safe }}">
                </div>

            </td>

        </tr>
        {% endif %}
        {% if hist_pic.hist_hours is defined %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_hours | safe }}">
                </div>

            </td>

        </tr>
        {% endif %}
        {% if hist_pic.hist_minutes is defined %}
        <tr>
            <td>
                <div>
                    <img src="data:image/jpeg;base64,{{ hist_pic.hist_minutes | safe }}">
                </div>

            </td>

        </tr>
        {% endif %}

    </table>
</div>